﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebDataControls;
using BF.Membership.MembershipEF;
using BF.Membership.BLL;

namespace BF.Web.pages.BaseSystem.RolePermissionManagement.RolesManagement
{
    public partial class RolesManagerView : BasePage
    {
        #region 实例
        AspnetRolesBLL rolesBLL = new AspnetRolesBLL();

        #endregion

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RoleId.Value = Request.QueryString["skey"] == null ? "" : Request.QueryString["skey"].ToString();
                SetModel();
            }
        }


        #region 绑定页面实体
        private void SetModel()
        {
            if (!String.IsNullOrEmpty(RoleId.Value))
            {
                aspnet_Roles roles = new aspnet_Roles();
                roles = rolesBLL.GetModel(new Guid(RoleId.Value));
                WebUIHelper.SetControlsValue(roles, "aspnet_Roles", this.Form);
            }
        }
        #endregion
    }
}